﻿<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Pragma" content="no-cache">
<meta name="GENERATOR" content="Microsoft FrontPage 12.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="STYLESHEET" type="text/css" id="SkinStyleSheet">
<title>WebNoteEditor&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</title>
<script language="vbscript" src="../script/window.vbs"></Script>
<script language="vbscript">
dim srcObj

Sub window_onload()
	With window
		.dialogHeight=WinDialogRange.clientHeight+68&"px"
		.dialogWidth=WinDialogRange.clientWidth+30&"px"
		.dialogLeft=window.screen.Width/2-Replace(.dialogWidth,"px","")/2
		.dialogTop=window.screen.Height/2-Replace(.dialogHeight,"px","")/2
	End With
End Sub

Sub WriteAllAttributes()
	dim tempStr,theLength,i,j,tempObj
	set srcObj=window.dialogArguments
	theLength=srcObj.Attributes.Length
	tempStr="<table>"
	
	set tempObj=srcObj.Attributes
	i=0
	For i=0 to theLength-1 Step 2
		tempStr=tempStr&"<tr>"
		For j=0 to 1
			if i+j=theLength then
				Exit For
			end if
			tempStr=tempStr&"<td>"&tempObj(i+j).Name&"</td><td><input type='text' id='Attributes_"&tempObj(i+j).Name&"'"
			
			if Trim(tempObj(i+j).Value)="" or tempObj(i+j).Value="null" or Lcase(TypeName(srcObj.getAttribute(tempObj(i+j).Name)))="null" then
				
				if tempObj(i+j).name="style" then
					tempStr=tempStr&" value='"&srcObj.style.cssText&"'" 
				else
					tempStr=tempStr&" value=''"
				end if
			else
				if tempObj(i+j).name="style" then
					tempStr=tempStr&" value='"&srcObj.style.cssText&"'" 
				else
					tempStr=tempStr&" value='"&tempObj(i+j).Value&"'"
				end if
			end if
			 
			tempStr=tempStr&" class='dialogInput'></td>"
		Next
		tempStr=tempStr&"</tr>"
	Next
	tempStr=tempStr&"</table>"
	Div_ObjectAttributes.innerHTML=tempStr
End Sub

Sub SetObjectAttributes()
	dim it,tempObj
	For each it in srcObj.attributes
		set tempObj=document.getElementByID("Attributes_"&it.Name)
		if Trim(tempObj.Value)<>"" then
			srcObj.setAttribute it.Name,tempObj.Value,0
		end if
		if it.Name="style" then
			srcObj.style.cssText=document.getElementByID("Attributes_style").Value
		end if
	Next
End Sub

Sub BtnSelectTarget_onclick()
	mmShowModalDialog "dialogTarget.htm",AreaTarget,210,230
End Sub

Sub BtnOk_onclick()
	SetObjectAttributes
	window.close
End Sub

Sub BtnCancel_onclick()
	window.close
End Sub
</script>
</head>
<body class="dialog">

<table border="0" cellspacing="0" cellpadding="0" id="WinDialogRange">
  <tr>
    <td>
    <div id="Div_ObjectAttributes" style="width:510;height:300;overflow-x:hidden;overflow-y:auto">
    	<script language="vbscript">WriteAllAttributes</script>
    </div>
    </td>
  </tr>
</table>
<div class="buttons">
	<hr size="1" color="#B3AC9D">
	<script language="vbscript" type="text/vbscript">
		call PrintButtons2()
	</script>
</div>

</body>

</html>
